﻿<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="keywords" content="@ViewBag.Profile.Name" />
    <meta name="description" content="@ViewBag.Profile.Name's Blog" />

    <meta property="og:locale" content="zh_cn" />
    <meta property="og:type" content="article" />
    <meta property="og:title" content="@ViewBag.Profile.Name" />
    <meta property="og:description" content="@ViewBag.Profile.Name's Blog" />
    <meta property="og:site_name" content="@ViewBag.Profile.Name" />
    <meta property="og:image" content="@OssService.GetAvatar()" />

    <title>@ViewBag.PageTitle | @ViewBag.Profile.Name</title>

    <link rel="shortcut icon" href="~/favicon.ico" />
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="~/css/shared/_layout.min.css" />

    <script type="text/javascript" src="~/lib/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script type="text/javascript" src="~/lib/scrollreveal/dist/scrollreveal.min.js"></script>

    @switch (ViewBag.Theme.ThemeType)
    {
        case ThemeType.Auto:
            @if (DateTime.Now.Hour > 18 || DateTime.Now.Hour < 7)
            {
                <script type="text/javascript" src="~/lib/darkreader/darkreader.min.js"></script>
                <script>DarkReader.setFetchMethod(window.fetch); DarkReader.enable();</script>
            }
            break;

        case ThemeType.White:
            break;

        case ThemeType.Black:
            <script type="text/javascript" src="~/lib/darkreader/darkreader.min.js"></script>
            <script>DarkReader.setFetchMethod(window.fetch); DarkReader.enable();</script>
            break;
    }

</head>
<body>

    @await Component.InvokeAsync("Navbar")

    <div id="content">
        @RenderBody()
    </div>

    <!--footer-->
    <footer class="bd-footer text-muted">

        <div class="container" id="footerInfo">
            <div class="row">

                <div class="col-md-3">
                    <p class="title">What's new</p>
                    @foreach (var item in ViewBag.Profile.WhatsNew)
                    {
                        <p><a target="_blank" href="@item.Link">@item.Title</a></p>
                    }
                </div>

                <div class="col-md-3">
                    <p class="title">FriendLinks</p>
                    @foreach (var item in ViewBag.Profile.FriendLinks)
                    {
                        <p><a target="_blank" href="@item.Link">@item.Title</a></p>
                    }
                </div>

                <div class="col-md-3">
                    <p class="title">About</p>
                    @foreach (var item in ViewBag.Profile.About)
                    {
                        <p><a target="_blank" href="@item.Link">@item.Title</a></p>
                    }
                </div>

                <div class="col-md-3">
                    <p class="title">Others</p>
                    @foreach (var item in ViewBag.Profile.Others)
                    {
                        <p><a target="_blank" href="@item.Link">@item.Title</a></p>
                    }
                </div>

            </div>
        </div>

        <div class="container-fluid p-3 p-md-5 text-center">
            <p>
                Designed and Developed by
                <a target="_blank" href="https://www.lllxy.net/"><strong>LLLXY</strong></a>
                ❤ Powered by
                <a target="_blank" href="https://dotnet.microsoft.com/"><strong>.NET</strong></a> @ViewBag.FrameworkVersion
            </p>
            <p>
                &copy; @DateTime.Now.Year - @ViewBag.Profile.Name
                &nbsp;<a href="https://beian.miit.gov.cn/" target="_blank"><strong>@ViewBag.Profile.ICP</strong></a>
            </p>
        </div>

    </footer>

    <div id="privacy">
        <a asp-controller="Home" asp-action="Privacy">
            <svg width="37" height="115" xmlns="http://www.w3.org/2000/svg" fill="none">
                <g>
                    <rect x="-1" y="-1" width="39" height="117" />
                </g>
                <g>
                    <rect x="-78" y="17" width="200" height="80" transform="rotate(-90 29,62)" fill="#007bff" />
                    <text x="-13" y="63" font-size="20" transform="rotate(-90 19,57)" fill="#ffffff">Privacy</text>
                </g>
            </svg>
        </a>
    </div>

    <div id="top" class="gototop js-top">
        <a onclick="MoveTop()">
            <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="white" class="bi bi-caret-up" viewBox="0 0 16 16">
                <path fill-rule="evenodd" d="M3.204 11L8 5.519 12.796 11H3.204zm-.753-.659l4.796-5.48a1 1 0 0 1 1.506 0l4.796 5.48c.566.647.106 1.659-.753 1.659H3.204a1 1 0 0 1-.753-1.659z"></path>
            </svg>
        </a>
    </div>

    <!-- Main -->
    <script type="text/javascript" src="~/js/shared/_layout.min.js"></script>

</body>
</html>
